package composite;

public abstract class OrganizationComponent {

    private String orgName;

    public OrganizationComponent(String orgName){
        this.orgName = orgName;
    }

    // 增加机构
    protected void add(OrganizationComponent organizationComponent){
        throw new UnsupportedOperationException();
    }

    // 删除机构
    protected void remove(OrganizationComponent organizationComponent){
        throw new UnsupportedOperationException();
    }

    protected abstract void print();

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

}
